-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/base skeleton #1
Conversation
Caution Review failedThe pull request is closed. WalkthroughThis update introduces significant enhancements to an authentication framework, including new structures and functionalities for handling JWT (JSON Web Tokens) and managing decentralized identities. Key additions encompass an Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant AuthService
participant Proxy
participant Storage
Client->>Server: HTTP Request
Server->>AuthService: Authenticate
AuthService-->>Server: Identity
Server->>Proxy: Authenticate with Identity
Proxy-->>Server: Authorization Result
Server->>Storage: Access Resource
Storage-->>Server: Resource Data
Server-->>Client: HTTP Response
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems very good ! I don't see any remarks about structure or naming. I think we will do some adjustment during implementation but that seems good. Good job π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good! Let's go.
36e93d1
to
11c7f16
Compare
Let's begin with that then :) |
This PR brings preliminary design skeleton to the SDK, nothing functional. the intent is to setup a base on interfaces.
ποΈ Structure
Find below details on the different go modules:
π Main components
auth.Proxy
A generic component to authenticate an identity given a signed credential, exposing a single
Authenticate
func. The idea is to be agnostic on the way the authentication is served (e.g. rest, gRPC...) and carry here only the business logic. thejwt.Factory
can use it to issue JWT tokens and provide configuration elements to issue and verify jwt tokens on an http server.storage.Proxy
A component to implement storage service proxies, taking care of all the generic tasks:
auth.Proxy
The specific logic to implement with an S3 for example is achieved by providing related functions when instantiating it.
It is also agnostic to the transport layer in its implementation, it offers configuration elements for an http server but could eventually be exposed in a different way.
dataverse.Client
Provide interactions with the protocol with a business logic dataverse oriented.
http.Server
An http server intended to be configured directly by proxy implementation to be served over http.
πΊ Example
Here is an example of a storage connector implementation using these:
π Missing
There is currently no canonical error handling here.
SSI & verifiable credentials management are also not covered currently.
βRemarks
@ccamel @bdeneux Let's challenge everything, structure, naming, etc..
Some methods are pre-implemented to give an idea of their scopes.